Generate supplemental RPM packages - #1147
Conversation
There was a problem hiding this comment.
Pull request overview
Adds RPM generation for target-level supplemental packages sharing the primary build output.
Changes:
- Generates RPM subpackage metadata, artifacts, dependencies, and scriptlets.
- Refactors shared artifact installation and scriptlet generation.
- Adds template and LLB-level tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
packaging/linux/rpm/template.go |
Generates supplemental RPM sections and artifacts. |
packaging/linux/rpm/template_test.go |
Tests generated subpackage specifications. |
packaging/linux/rpm/buildroot_test.go |
Tests generated RPM-spec LLB operations. |
117864c to
5f87907
Compare
invidian
left a comment
There was a problem hiding this comment.
Some minor comments, but LGTM overall. I did not analyze test coverage in depth, I assume it's sufficient.
| {{ .PreUn -}} | ||
| {{ .PostUn -}} | ||
| {{ .Files -}} | ||
| {{ .SubPackages -}} |
There was a problem hiding this comment.
With this amount of string builder code, have we tried leveraging templates more instead of string builder? Maybe it would make things more readable? Right now all this code here is rather hard to follow tbh.
There was a problem hiding this comment.
I think its something we could take a look at.
Templates have their own trade-off/readability issues, though.
4cfdccd to
9c8bdcb
Compare
6d192e0 to
a20af72
Compare
5d94f50 to
5de2413
Compare
Add SubPackages() method and supporting types to produce %package, %description, %files, and scriptlet sections for each supplemental package. Refactor Install() to include subpackage artifacts in the shared %install section. Includes comprehensive template-level tests. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Adds RPM subpackage sections, artifact selection, and scriptlets, with template and LLB-level coverage.
This is layer 2 of the native supplemental-packages stack and depends on #1146.
Related to #607.